<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Jialeo\LaravelSchemaExtend\Schema;

class AlertOpenShopSignOrderPermissionAnchorAddHandleruserList extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('open_shop_sign_order_permission_anchor', function (Blueprint $table) {
            $table->unsignedInteger('localInvestmentHandleUserId')->index('localInvestmentHandleUserId')->default(0)
                  ->after('localInvestmentManagerId')->comment('选址开发经手人(处理人)');
            $table->unsignedInteger('designUidHandleUserId')->index('designUidHandleUserId')->default(0)
                  ->after('designUid')->comment('指派空间设计师经办人(处理人)');
            $table->unsignedInteger('checkManagerHandleUserId')->index('checkManagerHandleUserId')->default(0)
                  ->after('checkManagerId')->comment('指派工程确认人经办人(处理人)');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('open_shop_sign_order_permission_anchor', function (Blueprint $table) {
            $table->dropColumn('localInvestmentHandleUserId');
            $table->dropColumn('designUidHandleUserId');
            $table->dropColumn('checkManagerHandleUserId');
        });
    }
}
